package org.hcf.data.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 好友表
 * </p>
 *
 * @author xianiyitiao
 * @since 2024-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ChatFriend对象", description="好友表")
public class ChatFriend extends Model<ChatFriend> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "friend_id", type = IdType.AUTO)
    private Long friendId;

    @ApiModelProperty(value = "用户id")
    private Long fromId;

    @ApiModelProperty(value = "好友id")
    private Long toId;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "好友关系:0.陌生人,1.好友,2.删除,3.黑名单")
    private byte relation;

    @ApiModelProperty(value = "是否免打扰")
    private boolean isNotDisturb;

    @ApiModelProperty(value = "好友来源")
    private byte source;

    @ApiModelProperty(value = "是否置顶:置顶时间0为不置顶")
    private long top;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime modifyTime;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "是否接收完成")
    private boolean receive;


    @Override
    protected Serializable pkVal() {
        return this.friendId;
    }

}
